<?php

namespace app\admin\validate;

use think\Validate;

class Group extends Validate
{

    protected $rule = [
        'name' => 'require|chsDash',
        'status' => 'require|number',
    ];
    protected $message  =   [
        'name.require'     =>'角色名称不能为空',
        'status.require'     =>'ERR_MISSING_SORT',
        'status.number'      =>'ERR_SORT_FORMAT_INCORRECT',
    ];

    protected $scene = [
        'add' => [
            'name',
            'status',
        ],
        'update' => [
            'name',
            'status',
        ]
    ];
}